package com.geovis.emergency.spd.biz.pc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.geovis.emergency.spd.entity.pc.entity.PcDrillPlanTask;
import com.geovis.emergency.spd.entity.pc.pojo.vo.TaskTimeStatisticsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 应急预案指挥模块-演练工作方案任务表 Mapper 接口
 * </p>
 *
 * @author Lonsho
 * @since 2022-06-08
 */
public interface PcDrillPlanTaskMapper extends BaseMapper<PcDrillPlanTask> {

    PcDrillPlanTask selectByPlanId(String taskId);

    /**
     * 根据演练id查询最新的反馈状态
     * @param planId 工作方案id
     * @param pcDrillId  演练id
     * @return
     */
    String selectStatusByPlanId(@Param("planId") String planId, @Param("pcDrillId") String pcDrillId);


    /**
     * 按组查询统计数据
     * @param drillId
     * @param pcDrillDisasterId
     * @return
     */
    List<TaskTimeStatisticsVO> selectTimeStatistics(@Param("drillId") String drillId, @Param("pcDrillDisasterId") String pcDrillDisasterId);
}
